<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Promise 模式显示城市信息</title>
</head>
<body>
    
</body>
<script src="./jquery.js"></script>
<script>
    function request(option){
         var def = $.Deferred();
         if(!option){
            throw Error('url is undefined');
         }
         var _confing ={

         }
         $.extend(_config,option,true);
         $
    }

    var option = {
        url: './city.json'
    }

    request(option).then(function(data){
        console.log(data);
    },function(err){
        console.log(err);
    })
</script>
</html>